<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../vue.global.js"></script>
</head>

<body>
    <div id="app">
        <form v-on:submit.prevent="onSubmit" action="http://www.baidu.com">
            <input type="text">
            <button>提交</button>
        </form>
        <div v-on:contextmenu.prevent="doSth">00544</div>
    </div>

    <script>
        const app = {
            methods:{
                onSubmit(){
                    alert("fuck off")
                },
                doSth(){
                    alert("fuck off")
                }
            }
        }
        Vue.createApp(app).mount("#app")
    </script>
</body>

</html>